package com.guaoran.user.constants;

import io.jsonwebtoken.Claims;

/**
 * 用户常量类
 */
public class UserConstants {
    //所有禁用的用户
    public final static String USER_DISABLED_SET = "USER:DISABLED";
    //禁用可以前缀
    public final static String USER_DISABLED_PREFIX = "DISABLED:";


    /**
     * 获得用户是否禁用的key
     * @param claims
     * @return
     */
    public static String getUserDisabledRedisKey(Claims claims) {
        return UserConstants.USER_DISABLED_PREFIX + String.valueOf(claims.get("uid"));
    }
}



